import request from '@/utils/request'
export function fetchRoleList() {
  return request({
    url:'/role/list',
    method:'get'
  })
}

export function updateRoleInfo(rid,info) {
    return request({
      url:'/role/update/'+rid,
      method:'post',
      data:info
    })
}
export function newRole(info) {
    return request({
      url:'/role/create/',
      method:'post',
      data:info
    })
}
export function deleteRole(info) {
  return request({
    url:'/role/delete',
    method:'post',
    data:info
  })
}
export function getCurPermission(rid) {
    return request({
      url:'/role/permission/'+rid,
      method:'get'
    })
}
export function updateCurPermission(info) {
  return request({
    url:'/role/permission/update',
    method:'post',
    data:info
  })
}